package net.lunjin.service;

import java.math.BigDecimal;
import java.util.List;

import net.lunjin.bean.News;

import finaler.util.Page;
import finaler.util.PageList;


public interface NewsService {

    public boolean insert(News news) throws Exception ;
    public boolean update(News news) throws Exception ;
    public void delete(News news) throws Exception ;
    
    public PageList getBbsList(Page page) throws Exception ;
    
    public PageList getNewsList(Page page) throws Exception ;
    
    public News findByKey(BigDecimal newsId) throws Exception ;

    public News findByTitle(String title,int newsType) throws Exception ;

	public List<News> getBbsTopRecord(int limit) throws Exception;

	public List<News> getTopRecord(int newsType, int limit) throws Exception;

	public List<News> getHotRecord(int newsType, int limit) throws Exception;

	public List<News> getRandomRecord(int newsType,int limit) throws Exception;
	
	public List<News> getBeforeAfterList(BigDecimal newsId,BigDecimal newsType) throws Exception;

	public PageList findAll(Page page) throws Exception;

	public void autoUpdateHit()throws Exception;

	public void autoCreateNewsPage(String file_real_path)throws Exception;

	public void autoCreateCalendarPage(String file_real_path)throws Exception;
	
	public News getByBaiduId(String baiduid) throws Exception;
}
